package com.yjt.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 曾智平
 * @ClassName: CommonUserVO
 * @Description: 公共用户信息
 * @date 2021/7/7 14:58
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public abstract class CommonEntity implements Serializable {

    @ApiModelProperty(hidden = true, value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTm;

    @ApiModelProperty(hidden = true, value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTm;

    @ApiModelProperty(hidden = true, value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(hidden = true, value = "更新人")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "默认1删除0", example = "1")
    @TableLogic(value = "1", delval = "0")
    private Integer isDel;

    @ApiModelProperty(value = "是否禁用(默认1禁用0)")
    private Integer isForbid;
}
